//
//  String+Emotion.swift
//  EmotionKeyboard
//
//  Created by 昱含 on 16/5/31.
//  Copyright © 2016年 YuHan. All rights reserved.
//

import Foundation

extension String {
    func emojiStr() -> String {
        let scanner = NSScanner(string: self)
        var value: UInt32 = 0
        scanner.scanHexInt(&value)
        let emojiCode = Character(UnicodeScalar(value))
        return "\(emojiCode)"
    }
}